-- GENERATED SPELL FOR [Vazruden the Herald] --


function spell0_17307(pUnit, Event) --@Bellowing Roar,Self--
pUnit:FullCastSpellOnTarget(39427,pUnit)
pUnit:RegisterEvent('Sorts_17307', 5500, 1)
end

function spell1_17307(pUnit, Event) --@Cone of Fire,n/a--
pUnit:FullCastSpellOnTarget(30926,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17307', 0, 1)
end

function spell2_17307(pUnit, Event) --@Cone of Fire,n/a--
pUnit:FullCastSpellOnTarget(36921,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17307', 0, 1)
end

function spell3_17307(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(30691,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17307', 3000, 1)
end

function spell4_17307(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(33793,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17307', 3000, 1)
end

function spell5_17307(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(34653,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17307', 0, 1)
end

function spell6_17307(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(36920,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17307', 0, 1)
end

function Sorts_17307(pUnit, Event)
local choix_sorts_17307 = math.random(0, 6)
if choix_sorts_17307 == 0 then
pUnit:RegisterEvent('spell0_17307', 1, 1)
end
if choix_sorts_17307 == 1 then
pUnit:RegisterEvent('spell1_17307', 1, 1)
end
if choix_sorts_17307 == 2 then
pUnit:RegisterEvent('spell2_17307', 1, 1)
end
if choix_sorts_17307 == 3 then
pUnit:RegisterEvent('spell3_17307', 1, 1)
end
if choix_sorts_17307 == 4 then
pUnit:RegisterEvent('spell4_17307', 1, 1)
end
if choix_sorts_17307 == 5 then
pUnit:RegisterEvent('spell5_17307', 1, 1)
end
if choix_sorts_17307 == 6 then
pUnit:RegisterEvent('spell6_17307', 1, 1)
end
end

function mob17307_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17307', math.random(1500, 3000), 1)
end

function mob17307_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17307_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17307_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17307, 1, 'mob17307_Action')
RegisterUnitEvent(17307, 2, 'mob17307_Leave')
RegisterUnitEvent(17307, 3, 'mob17307_Kill')
RegisterUnitEvent(17307, 4, 'mob17307_Die')
